package com.mycinema.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.mycinema.entity.Movie;

public interface MovieDao {

	List<Movie> getAll();
	Movie getById(int id);
	List<Movie> getMoviesTitleCid(@Param("cid")int cid,
			@Param("title")String title);	
	
	void updateMovie(Movie movie);		
	//f分页查询
	List<Movie>  getMoviesPage(@Param("cid")int cid,@Param("title")String title,
			                   @Param("startIndex")int startIndex,
			                   @Param("pageSize")int pageSize);	
	//计算总记录数
	int getRows(@Param("cid")int cid,@Param("title")String title);
	//按类别删除电影
	void deleteByCid(int cid);
	//新增电影
	void addMovie(Movie movie);
}
